<template>
	<view class="all">
		<u-popup v-model="showImg" mode="center">
			<image :src="showImgUrl" style="width: 90vw;height: 50vh;" mode="aspectFit"></image>
		</u-popup>
		<u-navbar :is-back="false"  :border-bottom="false"></u-navbar>
		<u-popup v-model="showLoginOut" mode="center">
			<view class="addPop" style="height: 160rpx;">
				<view style="margin-top: 40rpx;margin-left: 20rpx;">
					确定退出登录吗？
				</view>
				<view class="addAllBtns">
					<view class="cancelClass" @tap="cancelLoginOut">取消</view>
					<view class="confirmClass" @tap="confirmLoginOut">确定</view>
				</view>
			</view>
		</u-popup>
		<scroll-view class="list-left leftItem" scroll-y style="margin-top: 100rpx;">
			<image src="../../static/img.png" style="width: 90%;height: 50rpx;" mode="aspectFit"></image>
			<view class="list-nav oneItem" :class="currentIndex == item.id ? 'clickType' : 'normalType'" @tap="clickTab(item.id)" :key="index" v-for="(item, index) in dataList">
				<view>{{ item.name }}</view>
				<!-- <image src="../../static/down.png" v-if="item.id == 6" style="width: 30rpx;" mode="aspectFit"></image> -->
			</view>
			<view class="oneItem" @tap="clickMore">
				统计分析
				<image src="../../static/down.png" v-if="showDown" style="width: 30rpx;" mode="aspectFit"></image>
				<image src="../../static/up.png" v-if="showUp" style="width: 30rpx;" mode="aspectFit"></image>
			</view>
			<view v-if="showMore">
				<view class="innerItem" @tap="clickInner(1)" :class="innerIndex == '1' ? 'clickType' : 'normalType'">重量统计</view>
				<view class="innerItem" @tap="clickInner(2)" :class="innerIndex == '2' ? 'clickType' : 'normalType'">笔数统计</view>
			</view>
		</scroll-view>
		<view class="first" v-if="showOne" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
		</view>
		<view class="second" v-if="showTwo" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
			<view class="allTop" style="margin-left: 3.5vw;">
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						商家名称:
					</view>
					<input v-model="shangjiaName" placeholder="请输入商家名称" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						商家电话:
					</view>
					<input v-model="shangjiaPhone" placeholder="请输入商家电话" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						 开始时间:
					</view>
					<input v-model="startTime" placeholder="开始时间" @focus="clickStart" class="inputStyle" placeholder-class="placeClass" />
					<u-calendar v-model="showStart" :mode="modeStart" @change="confirmStart"></u-calendar>
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						 结束时间:
					</view>
					<input v-model="endTime" placeholder="结束时间" @focus="clickEnd" class="inputStyle" placeholder-class="placeClass" />
					<u-calendar v-model="showEnd" :mode="modeEnd" @change="confirmEnd"></u-calendar>
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						地址:
					</view>
					<input v-model="address" placeholder="请输入地址" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						分类:
					</view>
					<input v-model="selectValue" placeholder="请选择" class="inputStyle" @tap="showSelect = true" placeholder-class="placeClass" />
					<u-select v-model="showSelect" :list="typeList" @confirm="confirmSelect"></u-select>
				</view>
				<view class="allBtn" v-if="showDetail == false">
					<view class="search" @tap="clickSearch">查询</view>
					<view class="reset" @tap="clickReset">重置</view>
				</view>
				<view class="allBtn" v-if="showDetail == true">
					<view class="search" @tap="clickDetailSearch">查询</view>
					<view class="reset" @tap="clickDetailReset">重置</view>
				</view>
				<view class="allWeight" v-if="showDetail">总重量：{{ allWeight }}kg</view>
			</view>
			<view class="table" style="overflow: scroll;">
				<uni-table border stripe emptyText="暂无更多数据">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center">商家名称</uni-th>
						<uni-th align="center">商家电话</uni-th>
						<uni-th align="center">商家地址</uni-th>
						<uni-th align="center">重量(/kg)</uni-th>
						<uni-th align="center">提交时间</uni-th>
						<uni-th align="center">一级分类</uni-th>
						<uni-th align="center">二级分类</uni-th>
						<uni-th align="center">商品名称</uni-th>
						<uni-th align="center">图片</uni-th>
						<uni-th align="center">客户姓名</uni-th>
						<uni-th align="center">客户电话</uni-th>
						<uni-th align="center">客户身份证</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, i) in tableList" :key="i">
						<uni-td align="center">{{ item.submitterName }}</uni-td>
						<uni-td align="center">{{ item.submitterPhone }}</uni-td>
						<uni-td align="center">{{ item.submitterAddress }}</uni-td>
						<uni-td align="center">{{ item.weight }}</uni-td>
						<uni-td align="center">{{ item.createDate }}</uni-td>
						<uni-td align="center">{{ item.oneName }}</uni-td>
						<uni-td align="center">{{ item.twoName }}</uni-td>
						<uni-td align="center">{{ item.threeName }}</uni-td>
						<uni-td align="center" @tap="scanImg(item.picture)"><image :src="item.picture" style="width: 40rpx;height: 40rpx;" mode="aspectFit"></image></uni-td>
						<uni-td align="center">{{ item.userName }}</uni-td>
						<uni-td align="center">{{ item.userPhone }}</uni-td>
						<uni-td align="center">{{ item.userIdCard }}</uni-td>
					</uni-tr>
				</uni-table>
			</view>
			<view style="margin-top: 10rpx;margin-right: 3.5vw;">
				<uni-pagination show-icon="true" :total="total" :current="currentIndexs" :pageSize="pageSize" @change="changeIndex"></uni-pagination>
			</view>
		</view>
		<view class="third" v-if="showThree" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
			<view class="allTop" style="margin-left: 3.5vw;">
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						管理员名:
					</view>
					<input v-model="adminName" placeholder="请输入管理员名" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						账号:
					</view>
					<input v-model="adminAccount" placeholder="请输入账号" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view class="allBtns" style="margin-left: 0vw;">
					<view class="search" style="width: 25%;margin-right: 25rpx;" @tap="clickAdminSearch">查询</view>
					<view class="reset" style="width: 25%;margin-right: 25rpx;" @tap="clickAdminReset">重置</view>
					<view class="reset" style="width: 35%;background-color: #2D8CF0;" @tap="addAdminBtn">新增管理员</view>
				</view>
				<view class="allBtns" style="margin-left: 0vw;">
					<view class="search" style="width: 30%;margin-right: 25rpx;background-color: #2D8CF0;" @tap="modifyPassword">修改密码</view>
					<view v-if="isAdmin== 1" style="display:flex;">开启自动审批:
					<u-switch v-model="checked" @change="changeModify"></u-switch></view>
				</view>
			</view>
			<view class="table" style="overflow: scroll;">
				<uni-table border stripe emptyText="暂无更多数据">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center">管理员名</uni-th>
						<uni-th align="center">账号</uni-th>
						<uni-th align="center">密码</uni-th>
						<uni-th align="center">身份</uni-th>
						<uni-th align="center">操作</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, i) in tableList" :key="i">
						<uni-td align="center">{{ item.name }}</uni-td>
						<uni-td align="center">{{ item.account }}</uni-td>
						<uni-td align="center">{{ item.password }}</uni-td>
						<uni-td align="center">{{ item.identity == 1 ? '超级管理员' : '管理员' }}</uni-td>
						<uni-td align="center">
							<view style="display: flex;flex-wrap: nowrap;justify-content: space-around;">
								<view
									v-if="identityType == 1"
									@tap="editAdmin(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									编辑
								</view>
								<view
								    v-if="identityType == 1"
									@tap="deletAdmin(item)"
									style="width: 70rpx;height: 40rpx;background-color: #ED4014;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									删除
								</view>
							</view>
						</uni-td>
					</uni-tr>
				</uni-table>
			</view>
			<view style="margin-top: 10rpx;margin-right: 3.5vw;">
				<uni-pagination show-icon="true" :total="total" :current="currentIndexs" :pageSize="pageSize" @change="changeAdminIndex"></uni-pagination>
			</view>
			<u-popup v-model="showdeleteAdmin" mode="center">
				<view class="addPop" style="height: 160rpx;">
					<view class="popTop">
						确认删除此管理员?
						<view @tap="canceldeleteAdmin">X</view>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="canceldeleteAdmin">取消</view>
						<view class="confirmClass" @tap="confirmdeleteAdmin">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showAddAdmin" mode="center">
				<view class="addPop" style="height: 600rpx;width:80vw;">
					<view class="popTop">
						新增管理员
						<view @tap="cancelAddAdmin">X</view>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							管理员:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminName"
							placeholder="请输入管理员名"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							账号:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminAccount"
							placeholder="请输入账号"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							密码:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminPassword"
							placeholder="请输入密码"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style="margin-left: 40rpx;margin-top: 20rpx;">
						<u-radio-group v-model="isAdminCheck">
							<u-radio @change="adminChange" v-for="(item, index) in adminList" :key="index" :name="item.name" :disabled="item.disabled">{{ item.name }}</u-radio>
						</u-radio-group>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelAddAdmin">取消</view>
						<view class="confirmClass" @tap="confirmAddAdmin">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showModifyPassword" mode="center">
				<view class="addPop" style="height: 300rpx;width:80vw;">
					<view class="popTop">
						修改密码
						<view @tap="cancelModifyPassword">X</view>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							旧密码:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminName"
							placeholder="请输入旧密码"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							新密码:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminAccount"
							placeholder="请输入新密码"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					
				</view>
				<view class="addAllBtns">
					<view class="cancelClass" @tap="cancelModifyPassword">取消</view>
					<view class="confirmClass" @tap="confirmModifyPassword">确定</view>
				</view>
			</u-popup>
			<u-popup v-model="showEditAdmin" mode="center">
				<view class="addPop" style="height: 600rpx;width: 80vw;">
					<view class="popTop">
						编辑管理员
						<view @tap="cancelEditAdmin">X</view>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							管理员:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminName"
							placeholder="请输入管理员名"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							账号:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminAccount"
							placeholder="请输入账号"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							密码:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addAdminPassword"
							placeholder="请输入密码"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style="margin-left: 40rpx;margin-top: 20rpx;">
						<u-radio-group v-model="isAdminCheck">
							<u-radio @change="adminChange" v-for="(item, index) in adminList" :key="index" :name="item.name" :disabled="item.disabled">{{ item.name }}</u-radio>
						</u-radio-group>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelEditAdmin">取消</view>
						<view class="confirmClass" @tap="confirmEditAdmin">确定</view>
					</view>
				</view>
			</u-popup>
		</view>
		<view class="forth" v-if="showFour" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
			<view class="allTop" style="margin-left: 3.5vw;">
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						商家名称:
					</view>
					<input v-model="shangjiaName" placeholder="请输入商家名" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						地址:
					</view>
					<input v-model="address" placeholder="请输入地址" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						手机号:
					</view>
					<input v-model="shangjiaMobile" placeholder="请输入手机号" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view class="allBtns" style="margin-left: 0vw;">
					<view class="search" style="width: 25%;margin-right: 25rpx;" @tap="clickShangjiaSearch">查询</view>
					<view class="reset" style="width: 25%;margin-right: 25rpx;" @tap="clickShangjiaReset">重置</view>
					<view class="reset" style="width: 30%;background-color: #2D8CF0;" @tap="addShangjiaBtn">新增商家</view>
				</view>
			</view>
			<view class="table" style="overflow: scroll;">
				<uni-table border stripe emptyText="暂无更多数据">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center">商家名称</uni-th>
						<uni-th align="center">地址</uni-th>
						<uni-th align="center">手机号</uni-th>
						<uni-th align="center">账号</uni-th>
						<uni-th align="center">密码</uni-th>
						<uni-th align="center">是否审批</uni-th>
						<uni-th align="center">是否冻结</uni-th>
						<uni-th align="center">从业人数</uni-th>
						<uni-th align="center">备注</uni-th>
						<uni-th align="center">营业执照</uni-th>
						<uni-th align="center">门头照</uni-th>
						<uni-th align="center">场景照</uni-th>
						<uni-th align="center">操作</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, i) in tableList" :key="i">
						<uni-td align="center">{{ item.name }}</uni-td>
						<uni-td align="center">{{ item.address }}</uni-td>
						<uni-td align="center">{{ item.phone }}</uni-td>
						<uni-td align="center">{{ item.account }}</uni-td>
						<uni-td align="center">{{ item.password }}</uni-td>
						<uni-td align="center">{{ item.isExamine == 1 ? '待审批' : item.isExamine == 2 ? '通过' : '拒绝' }}</uni-td>
						<uni-td align="center">{{ item.isFrozen == 1 ? '未冻结' : '已冻结' }}</uni-td>
						<uni-td align="center">{{ item.workPeople }}</uni-td>
						<uni-td align="center">{{ item.remarks }}</uni-td>
						<uni-td align="center" @tap="scanImg(item.businessLicensePicture)"><image :src="item.businessLicensePicture" style="width: 40rpx;height: 40rpx;" mode="aspectFit"></image></uni-td>
						<uni-td align="center" @tap="scanImg(item.doorPhoto)"><image :src="item.doorPhoto" style="width: 40rpx;height: 40rpx;" mode="aspectFit"></image></uni-td>
						<uni-td align="center" @tap="scanImg(item.scenePhoto)"><image :src="item.scenePhoto" style="width: 40rpx;height: 40rpx;" mode="aspectFit"></image></uni-td>
						<uni-td align="center">
							<view style="display: flex;flex-wrap: nowrap;justify-content: space-around;">
								<view
									@tap="checkShangjia(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									审批
								</view>
								<view
									@tap="dongjieShangjia(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									{{ item.isFrozen == 1 ? '冻结' : '解冻' }}
								</view>
								<view
									@tap="editShangjia(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									编辑
								</view>
								<view
									@tap="scanShangjia(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									详情
								</view>
								<view
									v-if="isAdmin == 1"
									@tap="deletShangjia(item)"
									style="width: 70rpx;height: 40rpx;background-color: #ED4014;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									删除
								</view>
							</view>
						</uni-td>
					</uni-tr>
				</uni-table>
			</view>
			<view style="margin-top: 10rpx;margin-right: 3.5vw;">
				<uni-pagination show-icon="true" :total="total" :current="currentIndexs" :pageSize="pageSize" @change="changeShangjiaIndex"></uni-pagination>
			</view>
			<u-popup v-model="showdeleteShangjia" mode="center">
				<view class="addPop" style="height: 160rpx;">
					<view class="popTop">
						确认删除此商家?
						<view @tap="canceldeleteShangjia">X</view>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="canceldeleteShangjia">取消</view>
						<view class="confirmClass" @tap="confirmdeleteShangjia">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showAddShangjia" mode="center">
				<view class="addPop" style="height: 900rpx;width: 80vw;">
					<view class="popTop">
						新增商家
						<view @tap="cancelAddShangjia">X</view>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							商家名:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addShangjiaName"
							placeholder="请输入商家名"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							账号:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addShangjiaAccount"
							placeholder="请输入账号"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							密码:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addShangjiaPassword"
							placeholder="请输入密码"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							手机号:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addShangjiaPhone"
							placeholder="请输入手机号"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							地址:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addShangjiaAddress"
							placeholder="请输入地址"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							从业人数:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addShangjiaNum"
							placeholder="请输入从业人数"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							备注:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addShangjiaRemark"
							placeholder="请输入备注"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelAddShangjia">取消</view>
						<view class="confirmClass" @tap="confirmAddShangjia">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showEditShangjia" mode="center">
				<view class="addPop" style="height: 900rpx;width: 80vw;">
					<view class="popTop">
						编辑商家
						<view @tap="cancelEditShangjia">X</view>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							商家名:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editShangjiaName"
							placeholder="请输入商家名"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							账号:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editShangjiaAccount"
							placeholder="请输入账号"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							密码:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editShangjiaPassword"
							placeholder="请输入密码"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							手机号:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editShangjiaPhone"
							placeholder="请输入手机号"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							地址:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editShangjiaAddress"
							placeholder="请输入地址"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							从业人数:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editShangjiaNum"
							placeholder="请输入从业人数"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							备注:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editShangjiaRemark"
							placeholder="请输入备注"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					
					

					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelEditShangjia">取消</view>
						<view class="confirmClass" @tap="confirmEditShangjia">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showCheckShangjia" mode="center">
				<view class="addPop" style="height: 250rpx;">
					<view class="popTop">
						审批
						<view @tap="cancelCheckShangjia">X</view>
					</view>
					<view style="margin-left: 20rpx;margin-top: 20rpx;">
						<u-radio-group v-model="isCheck">
							<u-radio @change="radioChange" v-for="(item, index) in checkList" :key="index" :name="item.name" :disabled="item.disabled">{{ item.name }}</u-radio>
						</u-radio-group>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelCheckShangjia">取消</view>
						<view class="confirmClass" @tap="confirmCheckShangjia">确定</view>
					</view>
				</view>
			</u-popup>
		</view>
		<view class="fifth" v-if="showFive" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
			<view class="allTop">
				<view style='display: flex;flex-wrap: nowrap;align-items: center;margin-left:3.5vw;'>
					<view style="width: 30%;">
						一级分类:
					</view>
					<input  v-model="oneName" placeholder="请输入一级分类" class="inputStyle" placeholder-class="placeClass" />
				</view>
			</view>
			<view class="allBtns">
				<view class="search" style="width: 25%;margin-right: 25rpx;" @tap="clickTypeSearch">查询</view>
				<view class="reset" style="width: 25%;margin-right: 25rpx;" @tap="clickTypeReset">重置</view>
				<view class="addBtn" style="width: 30%;" @tap="addBtn">新增分类</view>
			</view>
			<view class="table" style="overflow: scroll;">
				<uni-table border stripe emptyText="暂无更多数据">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center">一级分类</uni-th>
						<uni-th align="center">是否冻结</uni-th>
						<uni-th align="center">操作</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, i) in tableList" :key="i">
						<uni-td align="center">{{ item.classification }}</uni-td>
						<uni-td align="center">{{ item.isFrozen == 1 ? '未冻结' : '已冻结' }}</uni-td>
						<uni-td align="center">
							<view style="display: flex;flex-wrap: nowrap;justify-content: space-around;">
								<view
									@tap="dongjie(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									{{ item.isFrozen == 1 ? '冻结' : '解冻' }}
								</view>
								<view
									@tap="edit(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									编辑
								</view>
								<view
									v-if="isAdmin== 1"
									@tap="delet(item)"
									style="width: 70rpx;height: 40rpx;background-color: #ED4014;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									删除
								</view>
							</view>
						</uni-td>
					</uni-tr>
				</uni-table>
			</view>
			<u-popup v-model="showdeleteType" mode="center">
				<view class="addPop" style="height: 160rpx;">
					<view class="popTop">
						确认删除此分类?
						<view @tap="canceldeleteType">X</view>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="canceldeleteType">取消</view>
						<view class="confirmClass" @tap="confirmdeleteType">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showAdd" mode="center">
				<view class="addPop" style="width: 80vw;">
					<view class="popTop">
						新增分类
						<view @tap="cancelAdd">X</view>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							一级分类:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="addOneName"
							placeholder="请输入一级分类名"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelAdd">取消</view>
						<view class="confirmClass" @tap="confirmAdd">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showEdit" mode="center">
				<view class="addPop" style="width: 80vw;">
					<view class="popTop">
						编辑分类
						<view @tap="cancelEdit">X</view>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							一级分类:
						</view>
						<input
							style="margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="editOneName"
							placeholder="请输入一级分类名"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					
					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelEdit">取消</view>
						<view class="confirmClass" @tap="confirmEdit">确定</view>
					</view>
				</view>
			</u-popup>
			<view style="margin-top: 10rpx;margin-right: 3.5vw;">
				<uni-pagination show-icon="true" :total="total" :current="currentIndexs" :pageSize="pageSize" @change="changeTypeIndex"></uni-pagination>
			</view>
		</view>
		<view class="sixth" v-if="showSix" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
			<view class="allTop" style="margin-left: 3.5vw;">
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						开始时间:
					</view>
					<input v-model="startTime" placeholder="开始时间" @focus="clickStart" class="inputStyle" placeholder-class="placeClass" />
					<u-calendar v-model="showStart" :mode="modeStart" @change="confirmStart"></u-calendar>
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						结束时间:
					</view>
					<input v-model="endTime" placeholder="结束时间" @focus="clickEnd" class="inputStyle" placeholder-class="placeClass" />
					<u-calendar v-model="showEnd" :mode="modeEnd" @change="confirmEnd"></u-calendar>
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						分类:
					</view>
					<input v-model="selectValue" placeholder="请选择" class="inputStyle" @tap="showSelect = true" placeholder-class="placeClass" />
					<u-select v-model="showSelect" :list="typeList" @confirm="confirmSelect"></u-select>
				</view>
				<view class="allBtn">
					<view class="search" @tap="clickWeightSearch">查询</view>
					<view class="reset" @tap="clickWeightReset">重置</view>
				</view>
				<view class="allWeight">总重量：{{ allWeight }}kg</view>
			</view>
			<view class="table" style="overflow: scroll;">
				<uni-table border stripe emptyText="暂无更多数据">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center">日期</uni-th>
						<uni-th align="center">重量(/kg)</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, i) in tableList" :key="i">
						<uni-td align="center">{{ item.date }}</uni-td>
						<uni-td align="center">{{ item.weight }}</uni-td>
					</uni-tr>
				</uni-table>
			</view>
		</view>
		<view class="sixth" v-if="showSeven" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
			<view class="allTop" style="margin-left: 3.5vw;">
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						开始时间:
					</view>
					<input v-model="startTime" placeholder="开始时间" @focus="clickStart" class="inputStyle" placeholder-class="placeClass" />
					<u-calendar v-model="showStart" :mode="modeStart" @change="confirmStart"></u-calendar>
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						结束时间:
					</view>
					<input v-model="endTime" placeholder="结束时间" @focus="clickEnd" class="inputStyle" placeholder-class="placeClass" />
					<u-calendar v-model="showEnd" :mode="modeEnd" @change="confirmEnd"></u-calendar>
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						分类:
					</view>
					<input v-model="selectValue" placeholder="请选择" class="inputStyle" @tap="showSelect = true" placeholder-class="placeClass" />
					<u-select v-model="showSelect" :list="typeList" @confirm="confirmSelect"></u-select>
				</view>
				<view class="allBtn">
					<view class="search" @tap="clickNumSearch">查询</view>
					<view class="reset" @tap="clickNumReset">重置</view>
				</view>
				<view class="allWeight">总笔数：{{ allNum }}</view>
			</view>
			<view class="table" style="overflow: scroll;">
				<uni-table border stripe emptyText="暂无更多数据">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center">日期</uni-th>
						<uni-th align="center">笔数</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, i) in tableList" :key="i">
						<uni-td align="center">{{ item.date }}</uni-td>
						<uni-td align="center">{{ item.bishu }}</uni-td>
					</uni-tr>
				</uni-table>
			</view>
		</view>
		<view class="second" v-if="showEight" style="margin-top: 150rpx;">
			<view @tap="loginOut" style="font-size: 28rpx;font-weight: bold;color: #797979;margin-top: 20rpx;display: flex;flex-wrap: nowrap;justify-content: flex-end;margin-right: 3.5vw;">
				{{userName}}
			</view>
			<view class="allTop" style="margin-left: 3.5vw;">
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						站点名称:
					</view>
					<input v-model="merchantName" placeholder="请输入站点名称" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						身份证号:
					</view>
					<input v-model="idCard" placeholder="请输入从业人员身份证" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						姓名:
					</view>
					<input v-model="peopleName" placeholder="请输入从业人员姓名" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
					<view style="width: 30%;">
						电话:
					</view>
					<input v-model="peoplePhone" placeholder="请输入从业人员电话" class="inputStyle" placeholder-class="placeClass" />
				</view>
				<view class="allBtn">
					<view class="search" @tap="clickPeopleSearch">查询</view>
					<view class="reset" @tap="clickPeopleReset">重置</view>
				</view>
			</view>
			<view class="table" style="overflow: scroll;">
				<uni-table border stripe emptyText="暂无更多数据">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center">站点名称</uni-th>
						<uni-th align="center">姓名</uni-th>
						<uni-th align="center">身份证</uni-th>
						<uni-th align="center">联系电话</uni-th>
						<uni-th align="center">提交时间</uni-th>
						<uni-th align="center">操作</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, i) in tableList" :key="i">
						<uni-td align="center">{{ item.merchantName }}</uni-td>
						<uni-td align="center">{{ item.name }}</uni-td>
						<uni-td align="center">{{ item.idCard }}</uni-td>
						<uni-td align="center">{{ item.phone }}</uni-td>
						<uni-td align="center">{{ item.createDate }}</uni-td>
						<uni-td align="center">
							<view style="display: flex;flex-wrap: nowrap;justify-content: space-around;">
								<view
									@tap="editPeople(item)"
									style="width: 70rpx;height: 40rpx;background-color: #19BE6B;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									编辑
								</view>
								<view
									@tap="deletPeople(item)"
									style="width: 70rpx;height: 40rpx;background-color: #ED4014;border-radius: 5rpx;text-align: center;line-height: 40rpx;color: #fff;"
								>
									删除
								</view>
							</view>
						</uni-td>
					</uni-tr>
				</uni-table>
			</view>
			<view style="margin-top: 10rpx;margin-right: 3.5vw;">
				<uni-pagination show-icon="true" :total="total" :current="currentIndexs" :pageSize="pageSize" @change="changePeopleIndex"></uni-pagination>
			</view>
			<u-popup v-model="showdeleteWork" mode="center">
				<view class="addPop" style="height: 160rpx;">
					<view class="popTop">
						确认删除此从业人员?
						<view @tap="canceldeleteWork">X</view>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="canceldeleteWork">取消</view>
						<view class="confirmClass" @tap="confirmdeleteWork">确定</view>
					</view>
				</view>
			</u-popup>
			<u-popup v-model="showPeopleEdit" mode="center">
				<view class="addPop" style="height: 480rpx;width: 80vw;">
					<view class="popTop">
						编辑从业人员
						<view @tap="cancelEditPeople">X</view>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							姓名:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="peopleName"
							placeholder="请输入姓名"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							身份证:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="idCard"
							placeholder="请输入身份证"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view style='display: flex;flex-wrap: nowrap;align-items: center;'>
						<view style="margin-top: 20rpx;margin-left: 40rpx;width: 20%;">
							联系电话:
						</view>
						<input
							style="width: 90%;margin-top: 40rpx;margin-left: 20rpx;margin-right: 20rpx;"
							v-model="peoplePhone"
							placeholder="请输入联系电话"
							class="inputStyle"
							placeholder-class="placeClass"
						/>
					</view>
					<view class="addAllBtns">
						<view class="cancelClass" @tap="cancelEditPeople">取消</view>
						<view class="confirmClass" @tap="confirmEditPeople">确定</view>
					</view>
				</view>
			</u-popup>
		</view>
	</view>
</template>

<script>
import config from '@/utils/config.js';
export default {
	data() {
		return {
			showdeleteWork: false,
			deleteWorkId: '',
			showdeleteAdmin: false,
			deleteAdminId: '',
			showdeleteType: false,
			deleteTypeId: '',
			deleteShangjiaId: '',
			showdeleteShangjia: false,
			showImg: false,
			showImgUrl: '',
			peopleId: '',
			showPeopleEdit: false,
			merchantName: '',
			idCard: '',
			peopleName: '',
			peoplePhone: '',
			showEight: false,
			showLoginOut: false,
			userName: uni.getStorageSync('userName'),
			dataList: [{ name: '首页', id: '1' }, { name: '回收记录', id: '2' }, { name: '商家管理', id: '4' }, { name: '分类管理', id: '5' }, { name: '管理员管理', id: '3' },{ name: '从业人员', id: '6' }],
			showOne: false,
			showTwo: false,
			showThree: false,
			showFour: true,
			showFive: false,
			showSix: false,
			showSeven: false,
			currentIndex: '4',
			innerIndex: '0',
			showMore: false,
			showDown: true,
			showUp: false,
			count: 0,
			////////////回收记录
			shangjiaName: '',
			shangjiaMobile: '',
			shangjiaPhone: '',
			startTime: '',
			endTime: '',
			showStart: false,
			modeStart: 'date',
			showEnd: false,
			modeEnd: 'date',
			address: '',
			selectValue: '',
			selectId: '',
			showSelect: false,
			typeList: [],
			tableList: [],
			total: 0,
			currentIndexs: 1,
			pageSize: 10,
			allWeight: '',
			allNum: '',
			//////分类管理
			oneName: '',
			showAdd: false,
			addOneName: '',
			showEdit: false,
			editId: '',
			editOneName: '',
			///////商家管理
			showAddShangjia: false,
			addShangjiaAccount: '',
			addShangjiaPassword: '',
			addShangjiaPhone: '',
			addShangjiaAddress: '',
			addShangjiaNum: '',
			addShangjiaRemark: '',
			addShangjiaName: '',
			showEditShangjia: false,
			editShangjiaName: '',
			editShangjiaAccount: '',
			editShangjiaPassword: '',
			editShangjiaPhone: '',
			editShangjiaAddress: '',
			editShangjiaNum: '',
			editShangjiaRemark: '',
			editShangjiaId: '',
			showCheckShangjia: false,
			isCheck: '',
			checkList: [
				{
					name: '通过',
					disabled: false
				},
				{
					name: '拒绝',
					disabled: false
				}
			],
			showDetail: false,
			detailId: '',
			//////管理员管理
			adminAccount: '',
			adminName: '',
			checked: false,
			showAddAdmin: false,
			addAdminName: '',
			addAdminAccount: '',
			addAdminPassword: '',
			isAdminCheck: '超级管理员',
			adminList: [
				{
					name: '超级管理员',
					disabled: false
				},
				{
					name: '管理员',
					disabled: false
				}
			],
			showModifyPassword: false,
			identityType: '',
			editAdminId: '',
			showEditAdmin: false,
			checkIds: '',
			isAdmin: 0,
		};
	},
	mounted() {
		this.currentIndexs = this.current;
		this.isAdmin = uni.getStorageSync('identity');
		console.log(this.isAdmin,"9999")
	},
	onLoad() {
		
	},
	onShow(){
		this.getToken();
		this.clickShangjiaSearch();
	},
	methods: {
		getToken(){
			uni.request({
				url: config.host + '/huishou/pcLogin/getAppLoginInfo', //接口地址。
				data: {
					token: uni.getStorageSync('token'),
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: (res) => {
					if(Object.keys(res.data.item).length == 0){
						uni.showToast({
							icon: 'none',
							title: '身份已过期，请重新登录！'
						});
						setTimeout(() => {
							uni.navigateTo({
								url: '../login/index'
							})
						}, 800);
						
					}else{
						
					}
				},
				fail: (err) => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickInner(i) {
			this.showOne = false;
			this.showTwo = false;
			this.showThree = false;
			this.showFour = false;
			this.showFive = false;
			this.showDetail = false;
			this.showEight = false;
			this.innerIndex = i;
			this.currentIndex = '0';
			if (i == 1) {
				this.showSix = true;
				this.showSeven = false;
				this.allNo();
				this.getTypeList();
				this.clickWeightSearch();
			} else {
				this.showSix = false;
				this.showSeven = true;
				this.allNo();
				this.getTypeList();
				this.clickNumSearch();
			}
		},
		clickMore() {
			this.count++;
			if (this.count % 2 == 0) {
				this.showMore = false;
				this.showDown = true;
				this.showUp = false;
			} else {
				this.showMore = true;
				this.showDown = false;
				this.showUp = true;
			}
		},
		clickTab(i) {
			this.currentIndex = i;
			this.innerIndex = '0';
			this.showDown = true;
			this.showUp = false;
			this.showDetail = false;
			if (i == 1) {
				this.showOne = true;
				this.showTwo = false;
				this.showThree = false;
				this.showFour = false;
				this.showFive = false;
				this.showSix = false;
				this.showSeven = false;
				this.showMore = false;
				this.showEight = false;
				this.allNo();
			} else if (i == 2) {
				this.showOne = false;
				this.showTwo = true;
				this.showThree = false;
				this.showFour = false;
				this.showFive = false;
				this.showSix = false;
				this.showSeven = false;
				this.showMore = false;
				this.showEight = false;
				this.allNo();
				this.getTypeList();
				this.clickSearch();
			} else if (i == 3) {
				this.showOne = false;
				this.showTwo = false;
				this.showThree = true;
				this.showFour = false;
				this.showFive = false;
				this.showSix = false;
				this.showSeven = false;
				this.showMore = false;
				this.showEight = false;
				this.allNo();
				this.clickAdminSearch();
				this.isInt();
				this.identityType = uni.getStorageSync('identity');
			} else if (i == 4) {
				this.showOne = false;
				this.showTwo = false;
				this.showThree = false;
				this.showFour = true;
				this.showFive = false;
				this.showSix = false;
				this.showSeven = false;
				this.showMore = false;
				this.showEight = false;
				this.allNo();
				this.clickShangjiaSearch();
			} else if (i == 5) {
				this.showOne = false;
				this.showTwo = false;
				this.showThree = false;
				this.showFour = false;
				this.showFive = true;
				this.showSix = false;
				this.showSeven = false;
				this.showMore = false;
				this.showEight = false;
				this.allNo();
				this.clickTypeSearch();
			} else if (i == 6) {
				this.showOne = false;
				this.showTwo = false;
				this.showThree = false;
				this.showFour = false;
				this.showFive = false;
				this.showSix = false;
				this.showSeven = false;
				this.showMore = false;
				this.showEight = true;
				this.allNo();
				this.clickPeopleSearch();
			}
		},
		//////回收记录
		clickStart() {
			this.showStart = true;
		},
		confirmStart(e) {
			this.startTime = e.result;
		},
		clickEnd() {
			this.showEnd = true;
		},
		confirmEnd(e) {
			this.endTime = e.result;
		},
		getTypeList() {
			this.typeList = [];
			uni.request({
				url: config.host + '/huishou/refuseClassification/queryAll', //接口地址。
				data: {},
				method: 'POST',
				header: {
					'content-type': 'application/x-www-form-urlencoded'
				},
				success: res => {
					let obj = {};
					if (res.data.code == 200) {
						res.data.itemList.forEach((item, i) => {
							obj.label = res.data.itemList[i].classification;
							obj.value = res.data.itemList[i].id;
							uni.setStorage({
								key: 'obj',
								data: obj
							});
							this.typeList.push(uni.getStorageSync('obj'));
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		confirmSelect(e) {
			this.selectValue = e[0].label;
			this.selectId = e[0].value;
		},
		clickSearch() {
			uni.request({
				url: config.host + '/huishou/scrapinformation/queryList', //接口地址。
				data: {
					currentPage: this.currentIndexs,
					pageSize: this.pageSize,
					submitterName: this.shangjiaName,
					submitterPhone: this.shangjiaPhone,
					submitterAddress: this.address,
					startTime: new Date(this.startTime).getTime(),
					endTime: new Date(this.endTime).getTime(),
					one: this.selectId
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					let obj = {};
					if (res.data.code == 200) {
						console.log(res);
						this.tableList = res.data.items;
						this.total = res.data.page.total;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickReset() {
			this.shangjiaName = '';
			this.shangjiaPhone = '';
			this.address = '';
			this.startTime = '';
			this.endTime = '';
			this.selectId = '';
			this.selectValue = '';
			this.clickSearch();
		},
		allNo() {
			this.shangjiaMobile = '';
			this.shangjiaName = '';
			this.shangjiaPhone = '';
			this.address = '';
			this.startTime = '';
			this.endTime = '';
			this.selectId = '';
			this.selectValue = '';
			this.currentIndexs = 1;
			this.pageSize = 10;
			this.total = 0;
			this.oneName = '';
			this.addOneName = '';
			this.addShangjiaAccount = '';
			this.addShangjiaPassword = '';
			this.addShangjiaPhone = '';
			this.addShangjiaAddress = '';
			this.addShangjiaNum = '';
			this.addShangjiaRemark = '';
			this.addShangjiaName = '';
			this.editShangjiaName = '';
			this.editShangjiaAccount = '';
			this.editShangjiaPassword = '';
			this.editShangjiaPhone = '';
			this.editShangjiaAddress = '';
			this.editShangjiaNum = '';
			this.editShangjiaRemark = '';
			this.isCheck = '通过';
			this.adminName = '';
			this.adminAccount = '';
			this.addAdminName = '';
			this.addAdminAccount = '';
			this.addAdminPassword = '';
			this.isAdminCheck = '超级管理员';
			this.showModifyPassword = false;
			this.idCard = '';
			this.peopleName = '';
			this.peoplePhone = '';
		},
		changeIndex(e) {
			this.currentIndexs = e.current;
			this.clickSearch();
			// this.clickTypeSearch();
			// this.clickShangjiaSearch();
		},
		changePeopleIndex(e) {
			this.currentIndexs = e.current;
			this.clickPeopleSearch();
		},
		changeTypeIndex(e) {
			this.currentIndexs = e.current;
			// this.clickSearch();
			this.clickTypeSearch();
			// this.clickShangjiaSearch();
		},
		changeShangjiaIndex(e) {
			this.currentIndexs = e.current;
			// this.clickSearch();
			// this.clickTypeSearch();
			this.clickShangjiaSearch();
		},
		clickWeightSearch() {
			uni.request({
				url: config.host + '/huishou/scrapinformation/queryWeight', //接口地址。
				data: {
					startTime: new Date(this.startTime).getTime(),
					endTime: new Date(this.endTime).getTime(),
					one: this.selectId
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						this.tableList = res.data.items;
						// this.allWeight = res.data.items[0].weight;
						this.allWeight = res.data.weight;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickWeightReset() {
			this.startTime = '';
			this.endTime = '';
			this.selectId = '';
			this.selectValue = '';
			this.clickWeightSearch();
		},
		clickNumSearch() {
			uni.request({
				url: config.host + '/huishou/scrapinformation/queryBishu', //接口地址。
				data: {
					startTime: new Date(this.startTime).getTime(),
					endTime: new Date(this.endTime).getTime(),
					one: this.selectId
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						console.log(res);
						this.tableList = res.data.items;
						// this.allNum = res.data.items[0].bishu;
						this.allNum = res.data.bishu;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickNumReset() {
			this.startTime = '';
			this.endTime = '';
			this.selectId = '';
			this.selectValue = '';
			this.clickNumSearch();
		},
		clickTypeSearch() {
			uni.request({
				url: config.host + '/huishou/refuseClassification/queryList', //接口地址。
				data: {
					currentPage: this.currentIndexs,
					pageSize: this.pageSize,
					classification: this.oneName
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						console.log(res);
						this.tableList = res.data.items;
						this.total = res.data.page.total;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickTypeReset() {
			this.oneName = '';
			this.clickTypeSearch();
		},
		addBtn() {
			this.showAdd = true;
		},
		cancelAdd() {
			this.showAdd = false;
			this.addOneName = '';
		},
		confirmAdd() {
			uni.request({
				url: config.host + '/huishou/refuseClassification/add', //接口地址。
				data: {
					classification: this.addOneName,
					token: uni.getStorageSync('token')
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.showAdd = false;
						this.clickTypeSearch();
						this.addOneName = '';
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		dongjie(i) {
			if (i.isFrozen == 1) {
				uni.request({
					url: config.host + '/huishou/refuseClassification/dongjie', //接口地址。
					data: {
						id: i.id,
						isFrozen: 2
					},
					method: 'POST',
					header: {
						'content-type': 'application/json;charset=UTF-8'
					},
					success: res => {
						if (res.data.code == 200) {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
							this.clickTypeSearch();
						} else {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
					},
					fail: err => {
						uni.showToast({
							icon: 'none',
							title: '网络异常,请稍后重试'
						});
					}
				});
			} else {
				uni.request({
					url: config.host + '/huishou/refuseClassification/dongjie', //接口地址。
					data: {
						id: i.id,
						isFrozen: 1
					},
					method: 'POST',
					header: {
						'content-type': 'application/json;charset=UTF-8'
					},
					success: res => {
						if (res.data.code == 200) {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
							this.clickTypeSearch();
						} else {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
					},
					fail: err => {
						uni.showToast({
							icon: 'none',
							title: '网络异常,请稍后重试'
						});
					}
				});
			}
		},
		edit(i) {
			console.log(i,"99999999999")
			this.editOneName = i.classification;
			this.showEdit = true;
			this.editId = i.id;
			this.editOneName = i.classification;
		},
		cancelEdit() {
			this.showEdit = false;
			this.editOneName = '';
		},
		confirmEdit() {
			uni.request({
				url: config.host + '/huishou/refuseClassification/update', //接口地址。
				data: {
					id: this.editId,
					classification: this.editOneName
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.clickTypeSearch();
						this.editOneName = '';
						this.showEdit = false;
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		canceldeleteType(){
			this.showdeleteType = false;
		},
		confirmdeleteType(){
			uni.request({
				url: config.host + '/huishou/refuseClassification/delete', //接口地址。
				data: {
					id: this.deleteTypeId,
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.clickTypeSearch();
						this.showdeleteType = false;
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		delet(i) {
			this.deleteTypeId = i.id;
			this.showdeleteType = true;
		},
		clickShangjiaSearch() {
			uni.request({
				url: config.host + '/huishou/merchant/queryList', //接口地址。
				data: {
					currentPage: this.currentIndexs,
					pageSize: this.pageSize,
					name: this.shangjiaName,
					address: this.address,
					phone: this.shangjiaMobile,
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						console.log(res);
						this.tableList = res.data.items;
						this.total = res.data.page.total;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickShangjiaReset() {
			this.shangjiaName = '';
			this.address = '';
			this.shangjiaMobile = '';
			this.clickShangjiaSearch();
		},
		addShangjiaBtn() {
			this.showAddShangjia = true;
		},
		cancelAddShangjia() {
			this.showAddShangjia = false;
			this.addShangjiaName = '';
			this.addShangjiaPassword = '';
			this.addShangjiaAccount = '';
			this.addShangjiaPhone = '';
			this.addShangjiaAddress = '';
			this.addShangjiaNum = '';
			this.addShangjiaRemark = '';
		},
		confirmAddShangjia() {
			if (this.addShangjiaPhone == '') {
				uni.showToast({
					icon: 'none',
					title: '请输入手机号'
				});
			} else if (this.addShangjiaAccount == '') {
				uni.showToast({
					icon: 'none',
					title: '请输入账号'
				});
			} else {
				let testName = /^[\u4e00-\u9fa5]{0,}$/;
				let testAccount = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
				let testPassword = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;
				let testPhone = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
				let testAddress = /[^0-9]+/;
				let testPeople =  /^\d+$|^\d+[.]?\d+$/;
				if(!testName.test(this.addShangjiaName)){
					uni.showToast({
						icon: 'none',
						title: '商家名只能为汉字'
					});
				}else if(!testAccount.test(this.addShangjiaAccount)){
					uni.showToast({
						icon: 'none',
						title: '账号不正确'
					});
				}
				else if(!testPassword.test(this.addShangjiaPassword)){
					uni.showToast({
						icon: 'none',
						title: '密码不正确'
					});
				}
				else if(!testPhone.test(this.addShangjiaPhone)){
					uni.showToast({
						icon: 'none',
						title: '手机号不正确'
					});
				}
				else if(!testAddress.test(this.addShangjiaAddress)){
					uni.showToast({
						icon: 'none',
						title: '地址不能为纯数字'
					});
				}
				else if(!testPeople.test(this.addShangjiaNum)){
					uni.showToast({
						icon: 'none',
						title: '从业人数只能为数字'
					});
				}
				else{
					uni.request({
						url: config.host + '/huishou/merchant/adminAdd', //接口地址。
						data: {
							name: this.addShangjiaName,
							token: uni.getStorageSync('token'),
							password: this.addShangjiaPassword,
							account: this.addShangjiaAccount,
							phone: this.addShangjiaPhone,
							address: this.addShangjiaAddress,
							workPeople: this.addShangjiaNum,
							remarks: this.addShangjiaRemark
						},
						method: 'POST',
						header: {
							'content-type': 'application/json;charset=UTF-8'
						},
						success: res => {
							if (res.data.code == 200) {
								uni.showToast({
									icon: 'none',
									title: res.data.msg
								});
								this.showAddShangjia = false;
								this.clickShangjiaSearch();
								this.addShangjiaName = '';
								this.addShangjiaPassword = '';
								this.addShangjiaAccount = '';
								this.addShangjiaPhone = '';
								this.addShangjiaAddress = '';
								this.addShangjiaNum = '';
								this.addShangjiaRemark = '';
							} else {
								uni.showToast({
									icon: 'none',
									title: res.data.msg
								});
							}
						},
						fail: err => {
							uni.showToast({
								icon: 'none',
								title: '网络异常,请稍后重试'
							});
						}
					});
				}
				
			}
		},
		dongjieShangjia(i) {
			if (i.isFrozen == 1) {
				uni.request({
					url: config.host + '/huishou/merchant/update', //接口地址。
					data: {
						id: i.id,
						isFrozen: 2
					},
					method: 'POST',
					header: {
						'content-type': 'application/json;charset=UTF-8'
					},
					success: res => {
						if (res.data.code == 200) {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
							this.clickShangjiaSearch();
						} else {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
					},
					fail: err => {
						uni.showToast({
							icon: 'none',
							title: '网络异常,请稍后重试'
						});
					}
				});
			} else {
				uni.request({
					url: config.host + '/huishou/merchant/update', //接口地址。
					data: {
						id: i.id,
						isFrozen: 1
					},
					method: 'POST',
					header: {
						'content-type': 'application/json;charset=UTF-8'
					},
					success: res => {
						if (res.data.code == 200) {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
							this.clickShangjiaSearch();
						} else {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
					},
					fail: err => {
						uni.showToast({
							icon: 'none',
							title: '网络异常,请稍后重试'
						});
					}
				});
			}
		},
		editShangjia(i) {
			this.showEditShangjia = true;
			this.editShangjiaId = i.id;
			this.editShangjiaName = i.name;
			this.editShangjiaAccount = i.account;
			this.editShangjiaPassword = i.password;
			this.editShangjiaPhone = i.phone;
			this.editShangjiaAddress = i.address;
			this.editShangjiaNum = i.workPeople;
			this.editShangjiaRemark = i.remarks;
		},
		canceldeleteShangjia(){
			this.showdeleteShangjia = false;
		},
		confirmdeleteShangjia(){
			uni.request({
				url: config.host + '/huishou/merchant/delete', //接口地址。
				data: {
					id: this.deleteShangjiaId,
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.clickShangjiaSearch();
						this.showdeleteShangjia = false;
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		deletShangjia(i) {
			this.deleteShangjiaId = i.id;
			this.showdeleteShangjia = true;
		},
		cancelEditShangjia() {
			this.showEditShangjia = false;
			this.editShangjiaName = '';
			this.editShangjiaAccount = '';
			this.editShangjiaPassword = '';
			this.editShangjiaPhone = '';
			this.editShangjiaAddress = '';
			this.editShangjiaNum = '';
			this.editShangjiaRemark = '';
		},
		confirmEditShangjia() {
				let testName = /^[\u4e00-\u9fa5]{0,}$/;
				let testAccount = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
				let testPassword = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;
				let testPhone = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
				let testAddress = /[^0-9]+/;
				let testPeople =  /^\d+$|^\d+[.]?\d+$/;
				if(!testName.test(this.editShangjiaName)){
					uni.showToast({
						icon: 'none',
						title: '商家名只能为汉字'
					});
				}else if(!testAccount.test(this.editShangjiaAccount)){
					uni.showToast({
						icon: 'none',
						title: '账号不正确'
					});
				}
				else if(!testPassword.test(this.editShangjiaPassword)){
					uni.showToast({
						icon: 'none',
						title: '密码不正确'
					});
				}
				else if(!testPhone.test(this.editShangjiaPhone)){
					uni.showToast({
						icon: 'none',
						title: '手机号不正确'
					});
				}
				else if(!testAddress.test(this.editShangjiaAddress)){
					uni.showToast({
						icon: 'none',
						title: '地址不能为纯数字'
					});
				}
				else if(!testPeople.test(this.editShangjiaNum)){
					uni.showToast({
						icon: 'none',
						title: '从业人数只能为数字'
					});
				}else{
					uni.request({
						url: config.host + '/huishou/merchant/changePeople', //接口地址。
						data: {
							id: this.editShangjiaId,
							name: this.editShangjiaName,
							password: this.editShangjiaPassword,
							account: this.editShangjiaAccount,
							phone: this.editShangjiaPhone,
							address: this.editShangjiaAddress,
							remarks: this.editShangjiaRemark,
							workPeople: this.editShangjiaNum
						},
						method: 'POST',
						header: {
							'content-type': 'application/json;charset=UTF-8'
						},
						success: res => {
							if (res.data.code == 200) {
								uni.showToast({
									icon: 'none',
									title: res.data.msg
								});
								this.clickShangjiaSearch();
								this.showEditShangjia = false;
								this.editShangjiaName = '';
								this.editShangjiaAccount = '';
								this.editShangjiaPassword = '';
								this.editShangjiaPhone = '';
								this.editShangjiaAddress = '';
								this.editShangjiaNum = '';
								this.editShangjiaRemark = '';
							} else {
								uni.showToast({
									icon: 'none',
									title: res.data.msg
								});
							}
						},
						fail: err => {
							uni.showToast({
								icon: 'none',
								title: '网络异常,请稍后重试'
							});
						}
					});
				}
		},
		scanShangjia(i) {
			this.currentIndexs = 1;
			this.showDetail = true;
			this.showTwo = true;
			this.showOne = false;
			this.showThree = false;
			this.showFour = false;
			this.showFive = false;
			this.showSix = false;
			this.showSeven = false;
			this.showMore = false;
			this.detailId = i.id;
			this.getTypeList();
			uni.request({
				url: config.host + '/huishou/scrapinformation/queryList', //接口地址。
				data: {
					currentPage: this.currentIndexs,
					pageSize: this.pageSize,
					submitter: i.id
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						console.log(res);
						this.tableList = res.data.items;
						this.total = res.data.page.total;
						this.allWeight = res.data.weight;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		checkShangjia(i) {
			this.showCheckShangjia = true;
			this.checkIds = i.id;
			this.isCheck = i.isExamine == 2 ? "通过" :  i.isExamine == 3 ? "拒绝" :  "" ;
			console.log(i,"00000")
		},
		cancelCheckShangjia() {
			this.showCheckShangjia = false;
			this.isCheck = '通过';
		},
		confirmCheckShangjia() {
			uni.request({
				url: config.host + '/huishou/merchant/approval', //接口地址。
				data: {
					id: this.checkIds,
					token: uni.getStorageSync('token'),
					isExamine: this.isCheck == '通过' ? 2 : 3
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.clickShangjiaSearch();
						this.showCheckShangjia = false;
						this.isCheck = '通过';
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		radioChange(e) {
			this.isCheck = e;
		},
		clickDetailSearch() {
			uni.request({
				url: config.host + '/huishou/scrapinformation/queryList', //接口地址。
				data: {
					currentPage: this.currentIndexs,
					pageSize: this.pageSize,
					submitterName: this.shangjiaName,
					submitterPhone: this.shangjiaPhone,
					submitterAddress: this.address,
					startTime: new Date(this.startTime).getTime(),
					endTime: new Date(this.endTime).getTime(),
					one: this.selectId,
					submitter: this.detailId
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					let obj = {};
					if (res.data.code == 200) {
						console.log(res);
						this.tableList = res.data.items;
						this.total = res.data.page.total;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickDetailReset() {
			this.shangjiaName = '';
			this.shangjiaPhone = '';
			this.address = '';
			this.startTime = '';
			this.endTime = '';
			this.selectId = '';
			this.selectValue = '';
			this.clickDetailSearch();
		},
		///////管理员管理
		clickAdminSearch() {
			uni.request({
				url: config.host + '/huishou/sysPeople/queryList', //接口地址。
				data: {
					currentPage: this.currentIndexs,
					pageSize: this.pageSize,
					name: this.adminName,
					account: this.adminAccount,
					token: uni.getStorageSync('token')
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						this.tableList = res.data.items;
						this.total = res.data.page.total;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickAdminReset() {
			this.adminName = '';
			this.adminAccount = '';
			this.clickAdminSearch();
		},
		addAdminBtn() {
			this.showAddAdmin = true;
		},
		modifyPassword() {
			this.showModifyPassword = true;
		},
		cancelModifyPassword() {
			this.showModifyPassword = false;
			this.addAdminName = '';
			this.addAdminAccount = '';
		},
		confirmModifyPassword() {
			uni.request({
				url: config.host + '/huishou/pcLogin/updatePwd', //接口地址。
				data: {
					oldPassword: this.addAdminName,
					newPassword: this.addAdminAccount,
					id: uni.getStorageSync('userId')
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.showModifyPassword = false;
						this.addAdminName = '';
						this.addAdminAccount = '';
						this.clickAdminSearch();
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		changeModify(e) {
			this.checked = e;
			uni.request({
				url: config.host + '/huishou/approval/update', //接口地址。
				data: {
					isPi : this.checked == true ? 1 : 2,
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		changeAdminIndex(e) {
			this.currentIndexs = e.current;
			this.clickAdminSearch();
		},
		cancelAddAdmin() {
			this.addAdminName = '';
			this.addAdminAccount = '';
			this.addAdminPassword = '';
			this.isAdminCheck = '超级管理员';
			this.showAddAdmin = false;
		},
		confirmAddAdmin() {
			uni.request({
				url: config.host + '/huishou/sysPeople/add', //接口地址。
				data: {
					account: this.addAdminAccount,
					password: this.addAdminPassword,
					name: this.addAdminName,
					identity: this.isAdminCheck == '超级管理员' ? 1 : 2
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.addAdminName = '';
						this.addAdminAccount = '';
						this.addAdminPassword = '';
						this.isAdminCheck = '超级管理员';
						this.showAddAdmin = false;
						this.clickAdminSearch();
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		adminChange(e) {
			this.isAdminCheck = e;
		},
		editAdmin(i){
			this.showEditAdmin = true;
			this.editAdminId = i.id;
			this.addAdminName = i.name;
			this.addAdminAccount = i.account;
			this.addAdminPassword = i.password;
			this.isAdminCheck = i.identity == 1 ? "超级管理员" : "管理员";
		},
		canceldeleteAdmin(){
			this.showdeleteAdmin = false;
		},
		confirmdeleteAdmin(){
			uni.request({
				url: config.host + '/huishou/sysPeople/delete', //接口地址。
				data: {
					id: this.deleteAdminId,
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.clickAdminSearch();
						this.showdeleteAdmin = false;
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		deletAdmin(i){
			this.showdeleteAdmin = true;
			this.deleteAdminId = i.id;
		},
		cancelEditAdmin(){
			this.addAdminName = '';
			this.addAdminAccount = '';
			this.addAdminPassword = '';
			this.showEditAdmin = false;
			this.isAdminCheck = "超级管理员";
		},
		confirmEditAdmin(){
			uni.request({
				url: config.host + '/huishou/sysPeople/update', //接口地址。
				data: {
					id: this.editAdminId,
					account: this.addAdminAccount,
					password: this.addAdminPassword,
					name: this.addAdminName,
					identity: this.isAdminCheck == '超级管理员' ? 1 : 2
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
						this.addAdminName = '';
						this.addAdminAccount = '';
						this.addAdminPassword = '';
						this.showEditAdmin = false;
						this.isAdminCheck = "超级管理员";
						this.clickAdminSearch();
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		isInt(){   //管理员中是否开启自动审批
			uni.request({
				url: config.host + '/huishou/approval/query', //接口地址。
				data: {},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						this.checked = res.data.item.isPi == 1 ? true : false;
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		loginOut(){    //退出登录
			this.showLoginOut = true;
		},
		cancelLoginOut(){
			this.showLoginOut = false;
		},
		confirmLoginOut(){
			this.showLoginOut = false;
			uni.clearStorageSync();
			setTimeout(() => {
				uni.navigateTo({
					url: '../login/index'
				})
			}, 300);
		},
		clickPeopleSearch(){
			uni.request({
				url: config.host + '/huishou/employees/queryList', //接口地址。
				data: {
					currentPage: this.currentIndexs,
					pageSize: this.pageSize,
					merchantName: this.merchantName,
					idCard: this.idCard,
					name: this.peopleName,
					phone: this.peoplePhone,
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						this.tableList = res.data.items;
						this.total = res.data.page.total;
						this.merchantName = '';
						this.idCard = '';
						this.peopleName = '';
						this.peoplePhone = '';
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		clickPeopleReset(){
			this.merchantName = '';
			this.idCard = '';
			this.peopleName = '';
			this.peoplePhone = '';
			this.clickPeopleSearch();
		},
		editPeople(i){
			console.log(i,"00000")
			this.showPeopleEdit = true;
			this.peopleId = i.id;
			this.peopleName = i.name;
			this.peoplePhone = i.phone;
			this.idCard = i.idCard;
		},
		canceldeleteWork(){
			this.showdeleteWork = false;
		},
		confirmdeleteWork(){
			uni.request({
				url: config.host + '/huishou/employees/delete', //接口地址。
				data: {
					id: this.deleteWorkId,
				},
				method: 'POST',
				header: {
					'content-type': 'application/json;charset=UTF-8'
				},
				success: res => {
					if (res.data.code == 200) {
						this.clickPeopleSearch();
						this.showdeleteWork = false;
					}
				},
				fail: err => {
					uni.showToast({
						icon: 'none',
						title: '网络异常,请稍后重试'
					});
				}
			});
		},
		deletPeople(i){
			this.showdeleteWork = true;
			this.deleteWorkId = i.id;
		},
		cancelEditPeople(){
			this.showPeopleEdit = false;
			this.idCard = '';
			this.peopleName = '';
			this.peoplePhone = '';
		},
		confirmEditPeople(){
				let testName = /^[\u4e00-\u9fa5]{0,}$/;
				let testAccount = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
				let testIdcard =  /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
				if(!testName.test(this.peopleName)){
					uni.showToast({
						icon: 'none',
						title: '姓名只能为汉字'
					});
				}else if(!testAccount.test(this.peoplePhone)){
					uni.showToast({
						icon: 'none',
						title: '手机号不正确'
					});
				}
				else if(!testIdcard.test(this.idCard)){
					uni.showToast({
						icon: 'none',
						title: '身份证不正确'
					});
				}else{
					uni.request({
						url: config.host + '/huishou/employees/changePeople', //接口地址。
						data: {
							id: this.peopleId,
							idCard: this.idCard,
							name: this.peopleName,
							phone: this.peoplePhone,
						},
						method: 'POST',
						header: {
							'content-type': 'application/json;charset=UTF-8'
						},
						success: res => {
							if (res.data.code == 200) {
								this.showPeopleEdit = false;
								this.idCard = '';
								this.peopleName = '';
								this.peoplePhone = '';
								this.clickPeopleSearch();
							}
						},
						fail: err => {
							uni.showToast({
								icon: 'none',
								title: '网络异常,请稍后重试'
							});
						}
					});
				}
		},
		scanImg(i){   //查看大图
			this.showImg = true;
			this.showImgUrl = i;
		}
	}
};
</script>

<style lang="scss">
.all {
	width: 100vw;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
}
.leftItem {
	width: 30vw;
	height: 100vh;
	background-color: #f8f8f8;
	padding-top: 100rpx;
	box-sizing: border-box;
}
.oneItem {
	height: 7%;
	width: 100%;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
}
.first {
	width: 70vw;
	height: 100px;
}
.second {
	width: 70vw;
}
.third {
	width: 70vw;
	height: 100px;
}
.forth {
	width: 70vw;
	height: 100px;
}
.fifth {
	width: 70vw;
	height: 100px;
}
.sixth {
	width: 70vw;
	height: 100px;
}
.clickType {
	color: #fff;
	background-color: rgba($color: #999, $alpha: 0.4);
}
.innerItem {
	height: 80rpx;
	width: 100%;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
}
.allTop {
	width: 63vw;
	margin-right: 3.5vw;
	margin-top: 40rpx;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}
.inputStyle {
	width: 75%;
	border: 1px solid #c5c5c5;
	height: 60rpx;
	border-radius: 10rpx;
	color: #c5c5c5;
	font-size: 28rpx;
	margin-top: 10rpx;
}
.placeClass {
	color: #c5c5c5;
	font-size: 28rpx;
}
.allBtn {
	width: 48%;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: center;
}
.allBtns {
	width: 90%;
	margin-left: 3.5vw;
	margin-right: 3.5vw;
	display: flex;
	flex-wrap: nowrap;
	// justify-content: space-between;
	align-items: center;
}
.search {
	width: 45%;
	height: 60rpx;
	line-height: 60rpx;
	border-radius: 10rpx;
	background-color: #2db7f5;
	color: #fff;
	text-align: center;
	font-size: 28rpx;
	margin-top: 10rpx;
}
.reset {
	width: 45%;
	height: 60rpx;
	line-height: 60rpx;
	border-radius: 10rpx;
	background-color: #19be6b;
	color: #fff;
	text-align: center;
	font-size: 28rpx;
	margin-top: 10rpx;
}
.addBtn {
	width: 45%;
	height: 60rpx;
	line-height: 60rpx;
	border-radius: 10rpx;
	background-color: #2d8cf0;
	color: #fff;
	text-align: center;
	font-size: 28rpx;
	margin-top: 10rpx;
}
.table {
	margin-top: 20rpx !important;
	width: 63vw;
	overflow: scroll;
}
.allWeight {
	font-size: 30rpx;
	color: #797979;
	font-weight: bolder;
	margin-top: 20rpx;
}
.addPop {
	width: 60vw;
	height: 300rpx;
}
.popTop {
	margin-top: 20rpx;
	padding-left: 20rpx;
	padding-right: 20rpx;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
}
.addAllBtns {
	width: 90%;
	margin-top: 40rpx;
	margin-left: 20rpx;
	margin-right: 20rpx;
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-end;
}
.cancelClass {
	width: 100rpx;
	height: 50rpx;
	line-height: 50rpx;
	color: #2d8cf0;
	margin-right: 30rpx;
	text-align: center;
}
.confirmClass {
	width: 100rpx;
	height: 50rpx;
	line-height: 50rpx;
	color: #fff;
	background-color: #2d8cf0;
	border-radius: 5rpx;
	text-align: center;
}
</style>
